package com.fyy.factory;

/**
 * @Author fyy
 * @Description
 * @Date 2020/7/22 18:09
 */
public class ShapeFactory {

    public Shape getShape(String shapeType){

        if(null == shapeType){
            return null;
        }

        if("RECTANGLE".equals(shapeType)){
            return new RectangleDraw();
        }

        if("SQUARE".equals(shapeType)){
            return new SquareDraw();
        }

        if("CIRCLE".equals(shapeType)){
            return new CircleDraw();
        }
        return null;

    }

}
